<template>

<div class="index_main">
 <scroll-view scroll-y>
   <div>
    <div class="item">
      <h4>业务管理</h4>
        <div class="block_main yewu" >
          <div  v-for="(item,index) in data.yewu" :key="index" class="router_block ">
            <navigator :url="item.path"  hover-class="none">
                <span>{{item.name}}</span>
              </navigator>
            </div>
          </div>
    </div>

    <div class="item">
      <h4>财务管理</h4>
        <div class="block_main caiwu" >
          <div  v-for="(item,index) in data.caiwu" :key="index" class="router_block ">
             <navigator :url="item.path"  hover-class="none">
                <span>{{item.name}}</span>
              </navigator>
            </div>
          </div>
    </div>


    <div class="item">
      <h4>仓库管理</h4>
        <div class="block_main cangku" >
          <div  v-for="(item,index) in data.cangku" :key="index" class="router_block ">
             <navigator :url="item.path"  hover-class="none">
                <span>{{item.name}}</span>
              </navigator>
            </div>
          </div>
    </div>
    </div>
  </scroll-view>   


    
  </div>
</template>

<script>

export default {
  data () {
    return {
      userInfo: {},
      data:{},
    }
  },



  methods: {
    getUserInfo () {
      // 调用登录接口
      wx.login({
        success: () => {
          wx.getUserInfo({
            success: (res) => {
              this.userInfo = res.userInfo
            }
          })
        }
      })
    },
  },

  mounted () {
      this.$https.get("http://rap2api.taobao.org/app/mock/22254/lyl/xiaochengxu/router_list").then(res=>{
            this.data = res.data.data ;
      })  
  },




}
</script>

<style lang="scss" scoped>
.index_main{
  height: 100%;
  box-sizing: border-box;
scroll-view {
      height: 100%;
._navigator{
  width: 100%;
  height: 100%;
}
    }
}
.item{
  padding-top:30rpx;
  color:#333;
  font-size: 36rpx;
  h4{margin-bottom:40rpx;padding-left:30rpx;font-weight: bold;}
.block_main{
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  padding:0 30rpx;
  font-size: 26rpx;
  margin-bottom:40rpx;
  
  .router_block{
    width: 215rpx;
    height: 255rpx;
    background-color: pink;
    text-align: center;
    margin-top:20rpx;
    margin-right:15rpx;
    padding-top:30rpx;
  }

 
}

.yewu{
   div:nth-child(1){
     background:url('') no-repeat;
      background-size: contain;
  }
   div:nth-child(2){
     background:url('') no-repeat;
      background-size: contain;
  }
   div:nth-child(3){
     background:url('') no-repeat;
      background-size: contain;
  }
}



.caiwu{
  div:nth-child(1){
    background: url('') no-repeat;
    background-size: contain;
  }
  div:nth-child(2){
    background: url('') no-repeat;
    background-size: contain;
  }
}



.cangku{
  div:nth-child(1){
    background: url('') no-repeat;
    background-size: contain;
  }
  div:nth-child(2){
    background: url('') no-repeat;
    background-size: contain;
  }
  div:nth-child(3){
    background: url('') no-repeat;
    background-size: contain;
  }
  div:nth-child(4){
    background: url('') no-repeat;
    background-size: contain;
  }
  div:nth-child(5){
    background: url('') no-repeat;
    background-size: contain;
  }
}


}
</style>

